package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.service.PermissionService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("permission")
public class PermissionController {
    @Reference(version = "1.0")
    PermissionService permissionService;

    @GetMapping("findAll")
    public Result findAll() {
        return permissionService.findAll();
    }

    @GetMapping("association")
    public Result association(Integer[] menuIds) {
        return permissionService.findPerByModuleId(menuIds);
    }
}
